package com.peanut.service.Impl;

import com.peanut.dao.CommonDao;
import com.peanut.dao.NavDao;
import com.peanut.dao.RecruitmentDao;
import com.peanut.model.RecruitmentModel;
import com.peanut.service.RecruitmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class RecruitmentServiceImpl implements RecruitmentService {
    @Autowired
    private CommonDao commonDao;
    @Autowired
    private NavDao navDao;
    @Autowired
    private RecruitmentDao recruitmentDao;


    @Override
    public Map<String, Object> getRecruitment() {
        Map<String,Object> map =new HashMap<>();
        map.put("common",commonDao.getCommonDate());
        map.put("nav",navDao.getNavList());
        map.put("mNav",navDao.getMNavList());
        map.put("postList",recruitmentDao.getPostList());
        List<RecruitmentModel> reList =new ArrayList<>();
        reList.add(recruitmentDao.getRecruitmentModel());
        map.put("recruitmentModel",reList);
        return map;
    }
}
